package com.yuwei.database.entity

import androidx.room.Entity
import androidx.room.PrimaryKey
import androidx.room.TypeConverters
import com.chad.library.adapter.base.entity.MultiItemEntity
import com.yuwei.database.Converters

@Entity(tableName = "order_info")
@TypeConverters(Converters::class)
data class OrderEntity(
    @PrimaryKey(autoGenerate = true)
    val id : Int,
    var count: Int,
    val goods_default_icon: String,
    val goods_default_price: Int,
    val goods_desc: String,
    val goods_id: Int,
    val user_id: Int?,
    var order_status: Int  //0: 创建 1：待支付 2：待发货 3：待收货 4：待评价
): MultiItemEntity {
    override val itemType: Int
        get() = order_status
}
